package com.tckdq.tcc.web.controller;

import com.tckdq.tcc.result.JsonResult;
import com.tckdq.tcc.service.ITokenService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class TokenController {
    @Autowired
    private ITokenService tokenService;
/*common/createToken/*/
    @RequestMapping(value = "/createToken/{courseId}",method = RequestMethod.GET)
    public JsonResult creatToken(@PathVariable("courseId")String courseId){

        return JsonResult.success(tokenService.creatToken(courseId));
    }
}
